package com.bajiao.service.industry.impl;

import com.bajiao.common.constant._Whole;
import com.bajiao.entity.industry.Industry;
import com.bajiao.mapper.industry.IndustryMapper;
import com.bajiao.service.industry.IndustryService;
import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import java.util.List;

/**
 * @Description: 行业
 * @Author: FanJq
 * @Date:   2024-12-12
 * @Version: V1.0
 */
@Service
public class IndustryServiceImpl extends ServiceImpl<IndustryMapper, Industry> implements IndustryService {

    /**
     * @Description
     * 行业列表
     * @date 2024/12/12 15:17
     * @author FanJq
     * @param
     * @return {@link List< Industry>}
    */
    @Override
    public List<Industry> getList() {
        List<Industry> industryList = super.lambdaQuery()
                .select(Industry::getId, Industry::getTitle, Industry::getImage)
                .eq(Industry::getEnable, _Whole.ZERO)
                .orderByAsc(Industry::getSort)
                .list();
        return industryList;
    }
}
